From: Lucas Werkmeister Date: Sun, 7 Feb 2021 18:41:36 +0000 (+0100) Subject: runDialog: Trim input before processing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~446 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6ac32f1fc0c0c5fce3e6de0fce1812ec8d283bbb;p=gnome-shell.git runDialog: Trim input before processing This way, whitespace-only (nonempty) input gets the same treatment of not being added to the history (see previous commit), which seems nice. Part of https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3183. Part-of: --- diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index b847f0d11..a01af5c9d 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -178,6 +178,7 @@ class RunDialog extends ModalDialog.ModalDialog { } _run(input, inTerminal) { + input = input.trim(); let command = input; if (input)